//
//  MyOperarion.m
//  NSOperation
//
//  Created by Justsoso on 16/3/24.
//  Copyright © 2016年 Justsoso. All rights reserved.
//

#import "MyOperarion.h"

@implementation MyOperarion

- (void)main
{
//    [NSThread sleepForTimeInterval:0.1];
//    NSLog(@"%@:%s ended!",[NSThread currentThread],__func__);
    
    for (int i=0; i<50; i++)
    {
        [NSThread sleepForTimeInterval:0.1];
        NSLog(@"%i download1 %@",i,[NSThread currentThread]);
    }
    if (self.isCancelled) return;
    for (int i=0; i<50; i++)
    {
        [NSThread sleepForTimeInterval:0.1];
        NSLog(@"%i download2 %@",i,[NSThread currentThread]);
    }
    if (self.isCancelled) return;
    for (int i=0; i<50; i++)
    {
        [NSThread sleepForTimeInterval:0.1];
        NSLog(@"%i download3 %@",i,[NSThread currentThread]);
    }
}
@end
